
package com.phevos.common.dbpool;

/**
 * ��ݿ�l�ӳ��ࡣ modify by zhaoch on 20040616: ��l�ӳش���ﵽһ�������,���³�ʼ��l�ӳ�
 */
public final class BasicConnectionPool extends ConnectionPool
{
    private static BasicConnectionPool bcp = null;

    /**
     * ˽�й����� ��������ļ���Ϣ��b��ݿ�l�ӳء�
     */
    private BasicConnectionPool()
    {
        initDataSource();
    }

    /**
     * �����ݿ�l�ӳ�ʵ�� ����Ψһ�ܹ��õ�l�ӳ�ʵ��ķ�����
     */
    public static BasicConnectionPool getInstance()
    {
        if (bcp != null)
        {
            return bcp;
        }

        bcp = new BasicConnectionPool();
        return bcp;
    }

    String getPoolIdentifier()
    {
        return "basicpool";
    }

    public String[] getReportConnect()
    {
        String dbUrl = PoolConfig.getInstance().getUrl();
        String dbDriver = PoolConfig.getInstance().getDriver();
        String user = PoolConfig.getInstance().getUser();
        String password = PoolConfig.getInstance().getPassword();
        String[] values = new String[]{dbUrl, dbDriver, user, password};
        return values;
        // return null;
    }
}
